package com.zy.dp.iterator.example5;

import java.util.Iterator;

public class Client
{
	public static void main(String[] args)
	{
		PayManager payManager = new PayManager();
		payManager.calcPay();
		test(payManager.createIterator());
		SalaryManager salaryManager = new SalaryManager();
		salaryManager.calcSalary();
		test(salaryManager.createIterator());

	}

	@SuppressWarnings("rawtypes")
	private static void test(Iterator it)

	{
		while (it.hasNext())
		{
			PayModel payModel = (PayModel) it.next();
			System.out.println(payModel);
		}

	}

}
